<template>
  <div class="bg-white full-height padding-b-10">
    <div class="info-main-header">故障时长排行</div>
    <q-table
      :data="tableData"
      :columns="tableColumns"
      row-key="id"
      class="myTable scroll"
      :loading="isTableLoading"
      :pagination.sync="pagination"
      :hide-bottom="tableData.length > 0"
      no-data-label="暂无数据"
      style="height: 450px"
      color="primary"
    >
    </q-table>
  </div>
</template>
<script>
export default {
  name: 'fault-duration',
  data () {
    return {
      tableData: [],
      isTableLoading: false,
      tableColumns: [
        { name: 'index', label: '排名', align: 'left', field: 'index' },
        { name: 'deviceName', label: '设备', align: 'left', field: 'deviceName' },
        { name: 'faultDurationTime', label: '故障时长', align: 'left', field: 'faultDurationTime' }
      ],
      pagination: {
        rowsNumber: 0 // 总条数
      }
    }
  },
  methods: {
    initData (val) {
      this.tableData = val
    }
  }
}
</script>
